﻿CREATE TABLE [dbo].[dscGateway_Image] (
    [SopInstanceUID]    VARCHAR (100) NOT NULL,
    [SeriesInstanceUID] VARCHAR (100) NOT NULL,
    [StudyInstanceUID]  VARCHAR (100) NOT NULL,
    [SopClassUID]       VARCHAR (100) NOT NULL,
    [InstanceNumber]    INT           NOT NULL,
    [ContentDate]       DATETIME      DEFAULT (getdate()) NOT NULL,
    [NumberOfFrames]    INT           DEFAULT ((0)) NOT NULL,
    [Rows]              INT           DEFAULT ((0)) NOT NULL,
    [Columns]           INT           DEFAULT ((0)) NOT NULL,
    CONSTRAINT [PK_dscGateway_Image] PRIMARY KEY CLUSTERED ([SopInstanceUID] ASC),
    CONSTRAINT [FK_dscGateway_Image_dscGateway_Series] FOREIGN KEY ([SeriesInstanceUID]) REFERENCES [dbo].[dscGateway_Series] ([InstanceUID]),
    CONSTRAINT [FK_dscGateway_Image_dscGateway_Study] FOREIGN KEY ([StudyInstanceUID]) REFERENCES [dbo].[dscGateway_Study] ([InstanceUID])
);

